@import 'variables.less';
@import 'includes/search-result.less';

.inline-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  label {
    margin-right: 20px;
    margin-bottom: 0.25em;
    min-width: 130px;
  }

  select + input,
  input + input {
    margin-top: 0.5em;
  }

  @media screen and (min-width: 610px) { // custom breakpoint for form sizing
    flex-wrap: nowrap;

    label {
      margin-bottom: 0;
    }

    select + input,
    input + input {
      margin-left: 10px;
      margin-top: 0;
    }

    &.is-condensed {
      select,
      input {
        width: 200px;
      }
      #id_end {
        margin-right: 0;
      }
    }
  }
}

.ui-datepicker {
    background: #fff;
    box-shadow: 0 0 31px -12px rgba(0, 0, 0, 0.25);

    &-header {
      margin: 20px 20px 0;
    }
    &-calendar {
      margin: 0 20px 20px;
    }
    &-prev,
    &-next {
      font-size: 0.8em;
      cursor: pointer;
    }

    &-next {
      float: right;
    }

    &-title {
      font-size: 1.2em;
    }

    th {
      font-weight: normal;
      opacity: 0.4;
      font-size: 0.7em;
    }

    td, th {
      padding: 4px 12px 4px 0;
      text-align: left;
    }
}


#advanced-search {
  #advanced-search-tabs {
    margin: 25px 0;

    > li {
      width: 33.33%;
    }
  }

  #tab-wrapper {
    &, label {
      font-size: 14px;
    }

    > form {
      > .container {
        margin-bottom: 20px;

        > label {
          + div,
          + input,
          + select {
            float: left;
          }

          + div {
            width: 510px;
          }
        }

        ul {
          list-style: none;
          margin: 0;
          padding: 0;

          > li {
            margin-bottom: 5px;
          }
        }
      }

      .category,
      .product,
      .radios,
      .thread-type,
      .topics {
        li {
          float: left;
          padding-left: 24px;
          padding-right: 10px;
          position: relative;

          input {
            left: 0;
            position: absolute;
            top: 3px;
          }
        }
      }

      .category,
      .product,
      .radios {
        li {
          width: 136px;
        }
      }

      .thread-type,
      .topics {
        li {
          width: 221px;

          &:nth-of-type(2n - 1) {
            clear: left;
          }
        }
      }
    }
  }

  .search-tips-small {
    color: @textLightGrey;
    float: left;
    font-size: 12px;
    margin: 6px 0 0 130px;
    width: 510px;
  }

  .submit-search {
    float: right;

    .btn {
      float: left;
      margin-left: 20px;

      + .btn {
        margin-top: 12px;
      }
    }
  }
}

#search-results {
  h2 {
    font-weight: bold;
    margin-top: 0;
  }

  .content-box {
    margin-bottom: 20px;
  }

  .search-filter {
    display: none;
  }

  @media screen and (min-width: 970px) {
    h2 {
      padding-left: 75px;
    }

    .content-box {
      padding-left: 78px;
    }

    .search-filter {
      display: block;
    }

    .html-rtl & {
      h2,
      .content-box {
        padding-left: 0;
        padding-right: 75px;
      }
    }
  }
}

#doctype-filter.search-filter {
  background-color: #fff;
  font-size: 14px;
  list-style: none;
  margin-top: 35px;
  padding-left: 78px;

  > li {
    background-color: #fff;
    border-bottom: 4px solid #e7e7e7;
    float: left;
    opacity: 0.5;
    padding-bottom: 10px;
    padding-right: 40px;

    > a,
    > a:link,
    > a:visited {
      color: #000;
      text-decoration: none;

      &:hover {
        color: #000;
        text-decoration: none;
      }

      > img {
        display: block;
        padding-bottom: 10px;
        height: 24px;

        &.show-everything {
          width: 24px;
        }

        &.help-article {
          width: 20px;
        }

        &.community-discussion {
          width: 24px;
        }
      }
    }

    &.selected {
      border-bottom: 4px solid #000;
      opacity: 1;

      > a,
      > a:link,
      > a:visited {
        font-weight: bold;
      }
    }
  }
}
